/*
 * Copyright (C) 2012 JiangHongTiao
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
package sk.lieskove.jianghongtiao.paris.core.persistence;

import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.ObjectOutputStream;
import java.io.Serializable;
import java.sql.Timestamp;
import java.util.logging.Level;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.OneToOne;
import org.apache.log4j.Logger;
import sk.lieskove.jianghongtiao.common.utils.PropertiesUtils;
import weka.classifiers.Evaluation;

/**
 * 
 * @author xjuraj e-mail: jjurco.sk_gmail.com
 */
@Entity
public class EvaluatorTestStatistics implements Serializable {

    private transient Logger log = Logger.getLogger(EvaluatorTestStatistics.class);
    private transient PropertiesUtils pu = new PropertiesUtils(EvaluatorTestStatistics.class);
    @Id
    @GeneratedValue(strategy = GenerationType.SEQUENCE)
    private Long id;
    @OneToOne(cascade = CascadeType.PERSIST, fetch = FetchType.EAGER)
    private ClassifierStatistics classifierStatistics;
    @OneToOne(cascade = CascadeType.PERSIST, fetch = FetchType.EAGER)
    private TestSet testSet;
    private double[] getClassPriors;
    private double[][] confusionMatrix;
    private Double avgCost;
    private Double correct;
    private Double correlationCoefficient;
    private Double coverageOfTestCasesByPredictedRegions;
    private Double errorRate;
    private Double incorrect;
    private Double kappa;
    private Double KBInformation;
    private Double KBMeanInformation;
    private Double KBRelativeInformation;
    private Double meanAbsoluteError;
    private Double meanPriorAbsoluteError;
    private Double numInstances;
    private Double pctCorrect;
    private Double pctIncorrect;
    private Double pctUnclassified;
    private Double priorEntropy;
    private Double relativeAbsoluteError;
    private Double rootMeanPriorSquaredError;
    private Double rootMeanSquaredError;
    private Double rootRelativeSquaredError;
    private Double SFEntropyGain;
    private Double SFMeanEntropyGain;
    private Double SFMeanPriorEntropy;
    private Double SFMeanSchemeEntropy;
    private Double SFPriorEntropy;
    private Double SFSchemeEntropy;
    private Double sizeOfPredictedRegions;
    private Double totalCost;
    private Double unclassified;
    private Double unweightedMacroFmeasure;
    private Double unweightedMicroFmeasure;
    private Double weightedAreaUnderROC;
    private Double weightedFalseNegativeRate;
    private Double weightedFalsePositiveRate;
    private Double weightedFMeasure;
    private Double weightedPrecision;
    private Double weightedRecall;
    private Double weightedTrueNegativeRate;
    private Double weightedTruePositiveRate;
    private double[] areaUnderROC;
    private double[] falseNegativeRate;
    private double[] falsePositiveRate;
    private double[] fMeasure;
    private double[] numFalseNegatives;
    private double[] numFalsePositives;
    private double[] numTrueNegatives;
    private double[] numTruePositives;
    private double[] precisionNum;
    private double[] trueNegativeRate;
    private double[] truePositiveRate;
    private double[] recall;
    private Timestamp dateTime;
    @Lob
    private String tree;
    @Lob
    private String stringConfusionMatrix;
    @Lob
    private byte[] evaluator;

    public EvaluatorTestStatistics() {
    }

    public EvaluatorTestStatistics(Timestamp dateTime) {
        this.dateTime = dateTime;
    }

    private double[] castDoubles(double[] array) {
        double[] result = new double[array.length];
        for (int i = 0; i < array.length; i++) {
            result[i] = new Double(array[i]);
        }
        return result;
    }

    private double[][] castDoubles2D(double[][] array) {
        double[][] result = new double[array.length][];
        for (int i = 0; i < array.length; i++) {
            result[i] = new double[array[i].length];
            for (int j = 0; j < array[i].length; j++) {
                result[i][j] = new Double(array[i][j]);
            }
        }
        return result;
    }

    public final void setResults(Evaluation eval) {
        this.getClassPriors = eval.getClassPriors();
        this.confusionMatrix = eval.confusionMatrix();
        this.avgCost = eval.avgCost();
        this.correct = eval.correct();
        this.coverageOfTestCasesByPredictedRegions = eval.coverageOfTestCasesByPredictedRegions();
        this.errorRate = eval.errorRate();
        this.incorrect = eval.incorrect();
        this.kappa = eval.kappa();
        this.meanAbsoluteError = eval.meanAbsoluteError();
        this.meanPriorAbsoluteError = eval.meanPriorAbsoluteError();
        this.numInstances = eval.numInstances();
        this.pctCorrect = eval.pctCorrect();
        this.pctIncorrect = eval.pctIncorrect();
        this.pctUnclassified = eval.pctUnclassified();
        this.rootMeanPriorSquaredError = eval.rootMeanPriorSquaredError();
        this.rootMeanSquaredError = eval.rootMeanSquaredError();
        this.rootRelativeSquaredError = eval.rootRelativeSquaredError();
        this.SFEntropyGain = eval.SFEntropyGain();
        this.SFMeanEntropyGain = eval.SFMeanEntropyGain();
        this.SFMeanPriorEntropy = eval.SFMeanPriorEntropy();
        this.SFMeanSchemeEntropy = eval.SFMeanSchemeEntropy();
        this.SFPriorEntropy = eval.SFPriorEntropy();
        this.SFSchemeEntropy = eval.SFSchemeEntropy();
        this.sizeOfPredictedRegions = eval.sizeOfPredictedRegions();
        this.totalCost = eval.totalCost();
        this.unclassified = eval.unclassified();
        this.unweightedMacroFmeasure = eval.unweightedMacroFmeasure();
        this.unweightedMicroFmeasure = eval.unweightedMicroFmeasure();
        this.weightedAreaUnderROC = eval.weightedAreaUnderROC();
        this.weightedFalseNegativeRate = eval.weightedFalseNegativeRate();
        this.weightedFalsePositiveRate = eval.weightedFalsePositiveRate();
        this.weightedFMeasure = eval.weightedFMeasure();
        this.weightedPrecision = eval.weightedPrecision();
        this.weightedRecall = eval.weightedRecall();
        this.weightedTrueNegativeRate = eval.weightedTrueNegativeRate();
        this.weightedTruePositiveRate = eval.weightedTruePositiveRate();

        this.areaUnderROC = areaUnderROCAsArray(eval, eval.getClassPriors().length);
        this.falseNegativeRate = falseNegativeRateAsArray(eval, eval.getClassPriors().length);
        this.falsePositiveRate = falsePositiveRateAsArray(eval, eval.getClassPriors().length);
        this.fMeasure = fMeasureAsArray(eval, eval.getClassPriors().length);
        this.numFalseNegatives = numFalseNegativesAsArray(eval, eval.getClassPriors().length);
        this.numFalsePositives = numFalsePositivesAsArray(eval, eval.getClassPriors().length);
        this.numTrueNegatives = numTrueNegativesAsArray(eval, eval.getClassPriors().length);
        this.numTruePositives = numTruePositivesAsArray(eval, eval.getClassPriors().length);
        this.precisionNum = precisionAsArray(eval, eval.getClassPriors().length);
        this.trueNegativeRate = trueNegativeRateAsArray(eval, eval.getClassPriors().length);
        this.truePositiveRate = truePositiveRateAsArray(eval, eval.getClassPriors().length);
        this.recall = recallAsArray(eval, eval.getClassPriors().length);

        try {
            this.correlationCoefficient = eval.correlationCoefficient();
        } catch (Exception ex) {
            log.error("Exception: " + ex);
            this.correlationCoefficient = null;
        }
        try {
            this.KBInformation = eval.KBInformation();
        } catch (Exception ex) {
            log.error("Exception: " + ex);
            this.KBInformation = null;
        }
        try {
            this.KBMeanInformation = eval.KBMeanInformation();
        } catch (Exception ex) {
            log.error("Exception: " + ex);
            this.KBMeanInformation = null;
        }
        try {
            this.KBRelativeInformation = eval.KBRelativeInformation();
        } catch (Exception ex) {
            log.error("Exception: " + ex);
            this.KBRelativeInformation = null;
        }
        try {
            this.priorEntropy = eval.priorEntropy();
        } catch (Exception ex) {
            log.error("Exception: " + ex);
            this.priorEntropy = null;
        }
        try {
            this.relativeAbsoluteError = eval.relativeAbsoluteError();
        } catch (Exception ex) {
            log.error("Exception: " + ex);
            this.relativeAbsoluteError = null;
        }
        try {
            stringConfusionMatrix = eval.toMatrixString();
        } catch (Exception ex) {
            log.error("Confusion matrix exception", ex);
        }
        //store evaluator object as bytearray
        try {
            ByteArrayOutputStream baos = new ByteArrayOutputStream();
            ObjectOutputStream oos = new ObjectOutputStream(baos);
            oos.writeObject(eval);
            oos.flush();
            oos.close();
            evaluator = baos.toByteArray();
        } catch (IOException ex) {
            log.error("Cannot serialize Evaluation object to byteArray!");
        }

    }

    public EvaluatorTestStatistics(Evaluation eval, ClassifierStatistics classifierStatistics,
            TestSet testSet, Timestamp dateTime) {
        this.classifierStatistics = classifierStatistics;
        this.testSet = testSet;
        this.dateTime = dateTime;
        setResults(eval);
    }

    public void setEvaluation(Evaluation evaluation) {
        setResults(evaluation);
    }

    private double[] areaUnderROCAsArray(Evaluation eval, int length) {
        double[] result = new double[length];
        for (int i = 0; i < length; i++) {
            result[i] = eval.areaUnderROC(i);
        }
        return result;
    }

    private double[] falseNegativeRateAsArray(Evaluation eval, int length) {
        double[] result = new double[length];
        for (int i = 0; i < length; i++) {
            result[i] = eval.falseNegativeRate(i);
        }
        return result;
    }

    private double[] falsePositiveRateAsArray(Evaluation eval, int length) {
        double[] result = new double[length];
        for (int i = 0; i < length; i++) {
            result[i] = eval.falsePositiveRate(i);
        }
        return result;
    }

    private double[] fMeasureAsArray(Evaluation eval, int length) {
        double[] result = new double[length];
        for (int i = 0; i < length; i++) {
            result[i] = eval.fMeasure(i);
        }
        return result;
    }

    private double[] numFalseNegativesAsArray(Evaluation eval, int length) {
        double[] result = new double[length];
        for (int i = 0; i < length; i++) {
            result[i] = eval.numFalseNegatives(i);
        }
        return result;
    }

    private double[] numFalsePositivesAsArray(Evaluation eval, int length) {
        double[] result = new double[length];
        for (int i = 0; i < length; i++) {
            result[i] = eval.numFalsePositives(i);
        }
        return result;
    }

    private double[] numTrueNegativesAsArray(Evaluation eval, int length) {
        double[] result = new double[length];
        for (int i = 0; i < length; i++) {
            result[i] = eval.numTrueNegatives(i);
        }
        return result;
    }

    private double[] numTruePositivesAsArray(Evaluation eval, int length) {
        double[] result = new double[length];
        for (int i = 0; i < length; i++) {
            result[i] = eval.numTruePositives(i);
        }
        return result;
    }

    private double[] precisionAsArray(Evaluation eval, int length) {
        double[] result = new double[length];
        for (int i = 0; i < length; i++) {
            result[i] = eval.precision(i);
        }
        return result;
    }

    private double[] trueNegativeRateAsArray(Evaluation eval, int length) {
        double[] result = new double[length];
        for (int i = 0; i < length; i++) {
            result[i] = eval.trueNegativeRate(i);
        }
        return result;
    }

    private double[] truePositiveRateAsArray(Evaluation eval, int length) {
        double[] result = new double[length];
        for (int i = 0; i < length; i++) {
            result[i] = eval.truePositiveRate(i);
        }
        return result;
    }

    private double[] recallAsArray(Evaluation eval, int length) {
        double[] result = new double[length];
        for (int i = 0; i < length; i++) {
            result[i] = eval.recall(i);
        }
        return result;
    }

    public Double getKBInformation() {
        return KBInformation;
    }

    public void setKBInformation(Double KBInformation) {
        this.KBInformation = KBInformation;
    }

    public Double getKBMeanInformation() {
        return KBMeanInformation;
    }

    public void setKBMeanInformation(Double KBMeanInformation) {
        this.KBMeanInformation = KBMeanInformation;
    }

    public Double getKBRelativeInformation() {
        return KBRelativeInformation;
    }

    public void setKBRelativeInformation(Double KBRelativeInformation) {
        this.KBRelativeInformation = KBRelativeInformation;
    }

    public Double getSFEntropyGain() {
        return SFEntropyGain;
    }

    public void setSFEntropyGain(Double SFEntropyGain) {
        this.SFEntropyGain = SFEntropyGain;
    }

    public Double getSFMeanEntropyGain() {
        return SFMeanEntropyGain;
    }

    public void setSFMeanEntropyGain(Double SFMeanEntropyGain) {
        this.SFMeanEntropyGain = SFMeanEntropyGain;
    }

    public Double getSFMeanPriorEntropy() {
        return SFMeanPriorEntropy;
    }

    public void setSFMeanPriorEntropy(Double SFMeanPriorEntropy) {
        this.SFMeanPriorEntropy = SFMeanPriorEntropy;
    }

    public Double getSFMeanSchemeEntropy() {
        return SFMeanSchemeEntropy;
    }

    public void setSFMeanSchemeEntropy(Double SFMeanSchemeEntropy) {
        this.SFMeanSchemeEntropy = SFMeanSchemeEntropy;
    }

    public Double getSFPriorEntropy() {
        return SFPriorEntropy;
    }

    public void setSFPriorEntropy(Double SFPriorEntropy) {
        this.SFPriorEntropy = SFPriorEntropy;
    }

    public Double getSFSchemeEntropy() {
        return SFSchemeEntropy;
    }

    public void setSFSchemeEntropy(Double SFSchemeEntropy) {
        this.SFSchemeEntropy = SFSchemeEntropy;
    }

    public double[] getAreaUnderROC() {
        return areaUnderROC;
    }

    public void setAreaUnderROC(double[] areaUnderROC) {
        this.areaUnderROC = areaUnderROC;
    }

    public Double getAvgCost() {
        return avgCost;
    }

    public void setAvgCost(Double avgCost) {
        this.avgCost = avgCost;
    }

    public double[][] getConfusionMatrix() {
        return confusionMatrix;
    }

    public void setConfusionMatrix(double[][] confusionMatrix) {
        this.confusionMatrix = confusionMatrix;
    }

    public Double getCorrect() {
        return correct;
    }

    public void setCorrect(Double correct) {
        this.correct = correct;
    }

    public Double getCorrelationCoefficient() {
        return correlationCoefficient;
    }

    public void setCorrelationCoefficient(Double correlationCoefficient) {
        this.correlationCoefficient = correlationCoefficient;
    }

    public Double getCoverageOfTestCasesByPredictedRegions() {
        return coverageOfTestCasesByPredictedRegions;
    }

    public void setCoverageOfTestCasesByPredictedRegions(Double coverageOfTestCasesByPredictedRegions) {
        this.coverageOfTestCasesByPredictedRegions = coverageOfTestCasesByPredictedRegions;
    }

    public Timestamp getDateTime() {
        return dateTime;
    }

    public void setDateTime(Timestamp dateTime) {
        this.dateTime = dateTime;
    }

    public Double getErrorRate() {
        return errorRate;
    }

    public void setErrorRate(Double errorRate) {
        this.errorRate = errorRate;
    }

    public byte[] getEvaluator() {
        return evaluator;
    }

    public void setEvaluator(byte[] evaluator) {
        this.evaluator = evaluator;
    }

    public double[] getfMeasure() {
        return fMeasure;
    }

    public void setfMeasure(double[] fMeasure) {
        this.fMeasure = fMeasure;
    }

    public double[] getFalseNegativeRate() {
        return falseNegativeRate;
    }

    public void setFalseNegativeRate(double[] falseNegativeRate) {
        this.falseNegativeRate = falseNegativeRate;
    }

    public double[] getFalsePositiveRate() {
        return falsePositiveRate;
    }

    public void setFalsePositiveRate(double[] falsePositiveRate) {
        this.falsePositiveRate = falsePositiveRate;
    }

    public double[] getGetClassPriors() {
        return getClassPriors;
    }

    public void setGetClassPriors(double[] getClassPriors) {
        this.getClassPriors = getClassPriors;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Double getIncorrect() {
        return incorrect;
    }

    public void setIncorrect(Double incorrect) {
        this.incorrect = incorrect;
    }

    public Double getKappa() {
        return kappa;
    }

    public void setKappa(Double kappa) {
        this.kappa = kappa;
    }

    public Double getMeanAbsoluteError() {
        return meanAbsoluteError;
    }

    public void setMeanAbsoluteError(Double meanAbsoluteError) {
        this.meanAbsoluteError = meanAbsoluteError;
    }

    public Double getMeanPriorAbsoluteError() {
        return meanPriorAbsoluteError;
    }

    public void setMeanPriorAbsoluteError(Double meanPriorAbsoluteError) {
        this.meanPriorAbsoluteError = meanPriorAbsoluteError;
    }

    public double[] getNumFalseNegatives() {
        return numFalseNegatives;
    }

    public void setNumFalseNegatives(double[] numFalseNegatives) {
        this.numFalseNegatives = numFalseNegatives;
    }

    public double[] getNumFalsePositives() {
        return numFalsePositives;
    }

    public void setNumFalsePositives(double[] numFalsePositives) {
        this.numFalsePositives = numFalsePositives;
    }

    public Double getNumInstances() {
        return numInstances;
    }

    public void setNumInstances(Double numInstances) {
        this.numInstances = numInstances;
    }

    public double[] getNumTrueNegatives() {
        return numTrueNegatives;
    }

    public void setNumTrueNegatives(double[] numTrueNegatives) {
        this.numTrueNegatives = numTrueNegatives;
    }

    public double[] getNumTruePositives() {
        return numTruePositives;
    }

    public void setNumTruePositives(double[] numTruePositives) {
        this.numTruePositives = numTruePositives;
    }

    public Double getPctCorrect() {
        return pctCorrect;
    }

    public void setPctCorrect(Double pctCorrect) {
        this.pctCorrect = pctCorrect;
    }

    public Double getPctIncorrect() {
        return pctIncorrect;
    }

    public void setPctIncorrect(Double pctIncorrect) {
        this.pctIncorrect = pctIncorrect;
    }

    public Double getPctUnclassified() {
        return pctUnclassified;
    }

    public void setPctUnclassified(Double pctUnclassified) {
        this.pctUnclassified = pctUnclassified;
    }

    public double[] getPrecisionNum() {
        return precisionNum;
    }

    public void setPrecisionNum(double[] precisionNum) {
        this.precisionNum = precisionNum;
    }

    public Double getPriorEntropy() {
        return priorEntropy;
    }

    public void setPriorEntropy(Double priorEntropy) {
        this.priorEntropy = priorEntropy;
    }

    public double[] getRecall() {
        return recall;
    }

    public void setRecall(double[] recall) {
        this.recall = recall;
    }

    public Double getRelativeAbsoluteError() {
        return relativeAbsoluteError;
    }

    public void setRelativeAbsoluteError(Double relativeAbsoluteError) {
        this.relativeAbsoluteError = relativeAbsoluteError;
    }

    public Double getRootMeanPriorSquaredError() {
        return rootMeanPriorSquaredError;
    }

    public void setRootMeanPriorSquaredError(Double rootMeanPriorSquaredError) {
        this.rootMeanPriorSquaredError = rootMeanPriorSquaredError;
    }

    public Double getRootMeanSquaredError() {
        return rootMeanSquaredError;
    }

    public void setRootMeanSquaredError(Double rootMeanSquaredError) {
        this.rootMeanSquaredError = rootMeanSquaredError;
    }

    public Double getRootRelativeSquaredError() {
        return rootRelativeSquaredError;
    }

    public void setRootRelativeSquaredError(Double rootRelativeSquaredError) {
        this.rootRelativeSquaredError = rootRelativeSquaredError;
    }

    public Double getSizeOfPredictedRegions() {
        return sizeOfPredictedRegions;
    }

    public void setSizeOfPredictedRegions(Double sizeOfPredictedRegions) {
        this.sizeOfPredictedRegions = sizeOfPredictedRegions;
    }

    public String getStringConfusionMatrix() {
        return stringConfusionMatrix;
    }

    public void setStringConfusionMatrix(String stringConfusionMatrix) {
        this.stringConfusionMatrix = stringConfusionMatrix;
    }

    public Double getTotalCost() {
        return totalCost;
    }

    public void setTotalCost(Double totalCost) {
        this.totalCost = totalCost;
    }

    public String getTree() {
        return tree;
    }

    public void setTree(String tree) {
        this.tree = tree;
    }

    public double[] getTrueNegativeRate() {
        return trueNegativeRate;
    }

    public void setTrueNegativeRate(double[] trueNegativeRate) {
        this.trueNegativeRate = trueNegativeRate;
    }

    public double[] getTruePositiveRate() {
        return truePositiveRate;
    }

    public void setTruePositiveRate(double[] truePositiveRate) {
        this.truePositiveRate = truePositiveRate;
    }

    public Double getUnclassified() {
        return unclassified;
    }

    public void setUnclassified(Double unclassified) {
        this.unclassified = unclassified;
    }

    public Double getUnweightedMacroFmeasure() {
        return unweightedMacroFmeasure;
    }

    public void setUnweightedMacroFmeasure(Double unweightedMacroFmeasure) {
        this.unweightedMacroFmeasure = unweightedMacroFmeasure;
    }

    public Double getUnweightedMicroFmeasure() {
        return unweightedMicroFmeasure;
    }

    public void setUnweightedMicroFmeasure(Double unweightedMicroFmeasure) {
        this.unweightedMicroFmeasure = unweightedMicroFmeasure;
    }

    public Double getWeightedAreaUnderROC() {
        return weightedAreaUnderROC;
    }

    public void setWeightedAreaUnderROC(Double weightedAreaUnderROC) {
        this.weightedAreaUnderROC = weightedAreaUnderROC;
    }

    public Double getWeightedFMeasure() {
        return weightedFMeasure;
    }

    public void setWeightedFMeasure(Double weightedFMeasure) {
        this.weightedFMeasure = weightedFMeasure;
    }

    public Double getWeightedFalseNegativeRate() {
        return weightedFalseNegativeRate;
    }

    public void setWeightedFalseNegativeRate(Double weightedFalseNegativeRate) {
        this.weightedFalseNegativeRate = weightedFalseNegativeRate;
    }

    public Double getWeightedFalsePositiveRate() {
        return weightedFalsePositiveRate;
    }

    public void setWeightedFalsePositiveRate(Double weightedFalsePositiveRate) {
        this.weightedFalsePositiveRate = weightedFalsePositiveRate;
    }

    public Double getWeightedPrecision() {
        return weightedPrecision;
    }

    public void setWeightedPrecision(Double weightedPrecision) {
        this.weightedPrecision = weightedPrecision;
    }

    public Double getWeightedRecall() {
        return weightedRecall;
    }

    public void setWeightedRecall(Double weightedRecall) {
        this.weightedRecall = weightedRecall;
    }

    public Double getWeightedTrueNegativeRate() {
        return weightedTrueNegativeRate;
    }

    public void setWeightedTrueNegativeRate(Double weightedTrueNegativeRate) {
        this.weightedTrueNegativeRate = weightedTrueNegativeRate;
    }

    public Double getWeightedTruePositiveRate() {
        return weightedTruePositiveRate;
    }

    public void setWeightedTruePositiveRate(Double weightedTruePositiveRate) {
        this.weightedTruePositiveRate = weightedTruePositiveRate;
    }

    public ClassifierStatistics getClassifierStatistics() {
        return classifierStatistics;
    }

    public void setClassifierStatistics(ClassifierStatistics classifierStatistics) {
        this.classifierStatistics = classifierStatistics;
    }

    public TestSet getTestSet() {
        return testSet;
    }

    public void setTestSet(TestSet testSet) {
        this.testSet = testSet;
    }
}
